<?php
namespace app\topics\service;
/**
 * 系统菜单接口
 */
class MenuService {
    public function getTopicsMenu() {
        return [
            array(
                'name' => '节点',
                'url' => url('topics/node/index'),
                'label' => 'topicsNode',
                'order' => 0
            ),
            array(
                'name' => '标签',
                'url' => url('topics/tags/index'),
                'label' => 'topicsTags',
                'order' => 1
            ),
        ];
    }
    /**
     * 获取菜单结构
     */
    public function getSystemMenu() {
        return array(
            'topics' => array(
                'name' => '论坛',
                'icon' => 'build',
                'order' => 1,
                'menu' => array(
                    array(
                        'name' => '节点管理',
                        'icon' => 'sitemap',
                        'order' => 1,
                        'menu' => array(
                            array(
                                'name' => '分组管理',
                                'icon' => 'code-fork',
                                'url' => url('topics/NodeGroup/index'),
                                'order' => 0
                            ),
                            array(
                                'name' => '节点管理',
                                'icon' => 'bars',
                                'url' => url('topics/Node/index'),
                                'order' => 1
                            ),
                        )
                    ),
                    array(
                        'name' => '社区设置',
                        'icon' => 'cogs',
                        'order' => 2,
                        'menu' => array(
                            array(
                                'name' => '基本设置',
                                'icon' => 'cog',
                                'url' => url('topics/Config/index'),
                                'order' => 0
                            ),
                        )
                    ),
                    array(
                        'name' => '用户管理',
                        'icon' => 'users',
                        'order' => 3,
                        'menu' => array(
                            array(
                                'name' => '用户管理',
                                'url' => url('topics/User/index'),
                                'order' => 0
                            ),
                            array(
                                'name' => '角色管理',
                                'url' => url('topics/UserRole/index'),
                                'order' => 1
                            ),
                        )
                    ),

                ),
            ),
        );
    }
}

